package com.ershijin.web;

import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ArticlesController {

    @GetMapping("/articles")
    public String[] getArticles() {
        System.out.println(SecurityContextHolder.getContext());;
        return new String[]{"Article 1", "Article 2", "Article 3"};
    }

    @GetMapping("/callback")
    public String callback() {
        return "callback";
    }
}